package cn.sczhyt.modules.app.controller;

import cn.sczhyt.common.utils.R;
import cn.sczhyt.modules.szhy.entity.MeetingServiceEntity;
import cn.sczhyt.modules.szhy.service.MeetingServiceService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Arrays;
import java.util.List;


/**
 * 会议服务
 *
 * @author luojialin
 * @email 78357966@qq.com
 * @date 2021-04-22 10:10:56
 */
@RestController
@RequestMapping("app/meetingservice")
public class AppMeetingServiceController {
    @Autowired
    private MeetingServiceService meetingServiceService;

    /**
     * 列表
     */
    @RequestMapping("/list/{meetingId}")
    public R list(@PathVariable String meetingId){
        QueryWrapper<MeetingServiceEntity> queryWrapper = new QueryWrapper<MeetingServiceEntity>()
                .eq("meeting_id",meetingId);

        List<MeetingServiceEntity> list = meetingServiceService.list(queryWrapper);

        return R.ok().put("data", list);
    }


    /**
     * 信息
     */
    @RequestMapping("/info/{serviceId}")
    public R info(@PathVariable("serviceId") String serviceId){
		MeetingServiceEntity meetingService = meetingServiceService.getById(serviceId);

        return R.ok().put("data", meetingService);
    }



}
